import type { PromotionData } from '@model/types/PromotionData';
import { t } from '@src/locales'
import { getRootWindow } from '@src/util/dom'
import url1 from '@src/assets/img/propagandaPage/page1.png';
import url2 from '@src/assets/img/propagandaPage/page2.png';
import url3 from 'src/assets/img/propagandaPage/page3.png';

const rootWindow = getRootWindow(window)
const userId = rootWindow?.loginUser?.userId || localStorage.getItem('loginUserId') || localStorage.getItem('userId')

export const customerSynchronization: PromotionData = {
    type: 6,
    url: url1,
    title: t('common.guide.systemIntegration.customerSynchronization.title'),
    guidTip: t('common.guide.systemIntegration.customerSynchronization.guidTip'),
};

export const productWarranty: PromotionData = {
    type: 7,
    url: url2,
    title: t('common.guide.systemIntegration.productWarranty.title'),
    guidTip: t('common.guide.systemIntegration.productWarranty.guidTip'),
};

export const assignWorkOrder: PromotionData = {
    type: 8,
    url: url3,
    title: t('common.guide.systemIntegration.assignWorkOrder.title'),
    guidTip: t('common.guide.systemIntegration.assignWorkOrder.guidTip'),
};

// 智能计划-升级
export const smartPlanUpgrade: PromotionData = {
    type: 14,
    guidTip: t('common.guide.systemIntegration.smartPlanUpgrade.guidTip'),
    btnText: t('common.guide.systemIntegration.smartPlanUpgrade.btnText'),
};